package com.mobile.check.net;

import java.io.Serializable;

import cn.droidlover.xdroidmvp.net.IModel;

/**
 * Created by 李坤翔 on 2017/7/31.
 */

public class BaseObjBean<T> implements Serializable, IModel {
    @Override
    public boolean isNull() {
        return this == null;
    }

    @Override
    public boolean isAuthError() {
        return code == 410000;
    }

    @Override
    public boolean isBizError() {
        return code != 1;
    }


    private String msg;
    private int code;
    private T data;

    @Override
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getMessage() {
        return msg;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

}